Magnetic sensor and camera module

ABSTRACT

A pair of bias magnets applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field. The bias magnet has an elongate cross section in a plane that is parallel both to the external magnetic field and to the bias magnetic field. In a projection plane that is parallel to the cross section and onto which the bias magnets and the magneto-resistive effect element are projected, the bias magnet includes an element facing side that is opposite to the magneto-resistive effect element and that extends in a longitudinal direction. The bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction. The element facing side is longer than other sides.

BACKGROUND OF THE INVENTION Field of the Invention

The present application is based on, and claims priority from, JP Application No. 2017-113576, filed on Jun. 8, 2017, the disclosure of which is hereby incorporated by reference herein in its entirety.

The present invention relates to a magnetic sensor and a camera module using the same, and particularly to the configuration of a bias magnet.

Description of the Related Art

A magnetic sensor that includes a magneto-resistive effect element has recently been used as a sensor for detecting the position of a moving object. The magnetic sensor moves relative to a magnet and thereby detects the change of an external magnetic field that is generated by the magnet. For example, in a camera module, a lens, which is a moving object, moves relative to a magnet, and a magnetic sensor that is fixed to the lens moves relative to the magnet. This movement changes the positional relationship between the magnetic sensor and the magnet and changes the external magnetic field that is detected by the magnetic sensor. The amount of movement of the moving object is calculated based on the change of the output of the magnetic sensor.

Normally, an external magnetic field does not become zero, and an external magnetic field that is detected by a magnetic sensor changes around a certain magnetic field intensity other than zero due to the movement of the magnetic sensor relative to the magnet. WO2014/111976A1, JP5843079B and JP2016-130686A disclose a magnetic sensor having bias magnets that are arranged on both sides of a magneto-resistive effect element. The surface of the bias magnet that is opposite to the magneto-resistive effect element is inclined relative to a direction that is perpendicular to the magnetic field detecting direction of the magneto-resistive effect element. Thus, the bias magnet applies a bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element. This enables a magnetic field that is applied to the magnetic sensor to substantially change around the zero magnetic field, thereby enhancing the linearity of the output and the accuracy with which the magnetic field intensity is detected.

SUMMARY OF THE INVENTION

The magnetic sensor disclosed in WO2014/111976A1 has a bias magnet that is common to a plurality of magneto-resistive effect elements. Therefore, the bias magnetic field changes for each magneto-resistive effect element, thus making it difficult to enhance the accuracy with which the magnetic field intensity is detected. The magnetic sensors disclosed in JP5843079B and JP2016-130686A have bias magnets for individual magneto-resistive effect elements, and the aforementioned problem hardly occurs. However, each bias magnet has an elongate cross section in which the surface that is opposite to the magneto-resistive effect element extends in the longitudinal direction, and the bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction. Thus, the magnetization direction of the bias magnet is easily directed (bent) in the longitudinal direction due to the shape anisotropy of the bias magnet, and the bias magnetic field cannot effectively be applied in a direction that is perpendicular to the longitudinal direction. JP5843079B and JP2016-130686A also disclose a bias magnet having an approximately square cross section. Such a bias magnet is unlikely to cause the aforementioned a problem, but it is difficult to improve space efficiency.

An object of the present invention is to provide a magnetic sensor having a bias magnet which has a surface that is opposite to a magneto-resistive effect element and that extends in the longitudinal direction, which is magnetized in a direction that is perpendicular to the longitudinal direction and whose magnetizing direction is less likely to be directed in the longitudinal direction.

A magnetic sensor according to an embodiment moves relative to an external magnet and detects a change of an external magnetic field that is generated by the external magnet. The magnetic sensor comprises: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; and a pair of bias magnets that is provided near the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field. The bias magnet has an elongate cross section in a plane that is parallel both to the external magnetic field and to the bias magnetic field. In a projection plane that is parallel to the cross section and onto which the bias magnets and the magneto-resistive effect element are projected, the bias magnet includes an element facing side that is opposite to the magneto-resistive effect element and that extends in a longitudinal direction, wherein the bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction, and the element facing side is longer than the other sides.

The cross section of the bias magnet of the magnetic sensor of the present invention has an element facing side that is longer than the other sides, and the cross section does not have a simple rectangular shape. Therefore, the shape anisotropy effect is limited, and the magnetizing direction is less likely to be directed in the longitudinal direction. Therefore, according to the present invention, it is possible to provide a magnetic sensor having a bias magnet which has a surface that is opposite to a magneto-resistive effect element and that extends in the longitudinal direction, which is magnetized in a direction that is perpendicular to the longitudinal direction and whose magnetizing direction is less likely to be directed in the longitudinal direction.

The above and other objects, features and advantages of the present invention will become apparent from the following description with reference to the accompanying drawings which illustrate examples of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual diagram of a camera module to which a magnetic sensor of the present invention is applied;

FIG. 2 is a circuit diagram showing a schematic configuration of the magnetic sensor;

FIGS. 3A and 3B are a plan view and a cross-sectional view showing a schematic configuration of the magnetic sensor, respectively;

FIG. 4 is a cross-sectional view showing a film configuration of a magneto-resistive effect element;

FIGS. 5A and 5B are diagrams showing an application pattern of a bias magnetic field and a magnetic field intensity-output curve, respectively;

FIG. 6 is a schematic plan view of the bias magnet shown in FIG. 5A;

FIG. 7 is a schematic perspective view of the bias magnet shown in FIG. 5A;

FIGS. 8A to 8D are diagrams showing bias magnets of comparative examples and an embodiment, as well as distribution of a bias magnetic field;

FIGS. 9A and 9B are schematic plan views of the bias magnets of the comparative examples;

FIGS. 10A to 10D are schematic plan views showing various modifications of the shape of the bias magnet;

FIGS. 11A and 11B are a schematic plan view and a sectional view of a magnetic sensor according to another embodiment of the present invention;

FIG. 12 is a schematic plan view of a magnetic sensor according to another embodiment of the present invention; and

FIGS. 13A and 13B are schematic plan views of a magnetic sensor according to other embodiments of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

Hereafter, magnetic sensors according to various embodiments of the present invention will be described with reference to the drawings. While each embodiment mentioned below is directed to a magnetic sensor that is mounted on a camera module, the present invention is not limited to this and may be widely applied to a magnetic sensor that moves relative to an external magnet and detects a change of the external magnetic field that is generated by the external magnet. In the following description and the drawings, the x-direction is a direction in which an external magnetic field is applied (magnetic field detecting direction of the magnetic sensor), the y-direction is a direction that is perpendicular to the x-direction in a plane that is parallel both to the external magnetic field direction and to the bias magnetic field direction, and the z-direction is a direction that is perpendicular both to the x-direction and to the y-direction. The xy-plane is a plane on which magneto-resistive effect elements and bias magnets are arranged in an element array and corresponds to the in-plane direction of the free layer of the magneto-resistive effect element. The z-direction is parallel to the stacking direction of the magneto-resistive effect element.

FIG. 1 shows a conceptual diagram of camera module 1 to which the magnetic sensor of the present invention is applied. Four magnets 3 are provided at four corners of casing 2 of an approximately rectangular parallelepiped shape. The upper surface and the lower surface of casing 2 have apertures that allow the optical axis of lens 4 to pass through, respectively. Lens holding member 5 that holds lens 4 is provided in casing 2. Lens holding member 5 is supported so as to be movable in optical axis direction LA (z-direction) by a pair of elastic members 8, 9 that are attached to casing 2 on both sides of lens 4 with respect to optical axis direction LA of lens 4. Magnetic sensors 6 are fixed to lens 4. Accordingly, lens 4 and magnetic sensors 6 are supported so as to be movable relative to magnets 3 in optical axis direction LA. Two magnetic sensors 6 are provided on lens 4, but the number of magnetic sensors 6 is not limited. Light that is collected by lens 4 is converted into image data by means of an imaging device (not shown), such as a CMOS device.

Annular or polygonal coil 7 is supported by lens holding member 5 inward of magnets 3 such that coil 7 is opposite to magnets 3. Elastic member 9 on the lower side of the figure is composed of two electrically conductive members 9 a, 9 b, which are connected to respective ends of coil 7 via lens holding member 5. When a current is caused to flow in coil 7 through two electrically conductive members 9 a, 9 b, coil 7 receives force in optical axis direction LA due to interaction (the Lorentz force) between a magnetic field that is generated by magnets 3 and the current that flows in coil 7. Coil 7 moves in optical axis direction LA against the biasing force of elastic members 8, 9. Lens holding member 5, lens 4 and magnetic sensors 6 also move in optical axis direction LA relative to magnets 3. Since an external magnetic field that is generated by magnets 3 is applied to magnetic sensors 6, when lens 4 moves upward in the z-direction, the distance between magnetic sensors 6 and magnets 3 in the z-direction is shortened and a larger magnetic field intensity is detected. When lens 4 moves downward in the z-direction, the distance between magnetic sensors 6 and magnets 3 in the z-direction is increased and magnetic field intensity that is detected is reduced. FIG. 1 shows magnetic flux B of the external magnetic field. Based on the principle above, magnetic sensors 6 detect and output a change of the external magnetic field that is caused by movement of lens 4. Since magnet 3 generates external magnetic field that is detected by magnetic sensor 6 in this manner, magnet 3 is referred to as external magnet 3 in the following description.

It should be noted that the above-mentioned embodiment is exemplary, and various configurations are possible as long as magnetic sensor 6 is movable relative to magnet 3. For example, a piezoelectric device, a shape memory alloy or a polymer actuator may be used instead of the coil as means of driving lens 4 to which magnetic sensors 6 are fixed. It is also possible that magnetic sensors 6 are fixed to casing 2 and that magnets 3 are movable relative to casing 2 together with lens 4. In other words, camera module 1 may have a first member that includes lens 4; a second member that supports the first member such that the first member is relatively movable in optical axis direction LA of lens 4; magnetic sensor 6; and external magnet 3. Magnetic sensor 6 may be supported by the first member or the second member, and external magnet 3 may be supported by the other first member or the other second member. The change of the distance between magnetic sensor 6 and external magnet 3 is linked with the change of the distance between lens 4 and the imaging device, and as mentioned later, the distance between lens 4 and the imaging device can be detected from the output of magnetic sensor 6.

FIG. 2 shows a schematic configuration of magnetic sensor 6. Magnetic sensor 6 has four element arrays 11 to 14. Element arrays 11 to 14 are connected to each other in a bridge circuit (a Wheatstone bridge). Four element arrays 11 to 14 are separated into two sets. Element arrays 11, 12 and element arrays 13, 14 of the sets are connected in series, respectively. One end of each set of the element arrays is connected to power supply voltage Vcc, and the other end thereof is grounded (GND). Magnetic sensor 6 outputs the intensity of an external magnetic field by detecting the difference between middle point voltages Vout1 and Vout2 of the respective sets of the element arrays. It should be noted that the external magnetic field can also be detected by using middle point voltage Vout1 or Vout 2 alone.

FIG. 3A shows a schematic plan view of a magnetic sensor. FIG. 3B shows a schematic cross-sectional view of the magnetic sensor taken along line A-A in FIG. 3A. FIG. 4 shows a film configuration of a magneto-resistive effect element. Each of element arrays 11 to 14 includes a plurality of magneto-resistive effect elements 15 that are connected in series and lead wires 16 that connect magneto-resistive effect elements 15. Magneto-resistive effect elements 15 generate a magnetic resistance change in accordance with a change of an external magnetic field. The number of magneto-resistive effect elements 15 in each element array 11 to 14 is not limited, but, for example, tens of magneto-resistive effect elements 15 may be connected in series. By increasing the number of magneto-resistive effect elements 15, variation of middle point voltages Vout1 and Vout2 can be limited, and the external magnetic field can be measured more accurately. As mentioned later, each magneto-resistive effect element 15 is a TMR (Tunneling Magneto-Resistive) element, and lead wires 16 that apply a sense current to magneto-resistive effect element 15 are connected both to the upper end and to the lower end of each magneto-resistive effect element 15. Each lead wire 16 connects the upper ends or the lower ends of magneto-resistive effect elements 15 that are adjacent to each other. Magneto-resistive effect element 15 is formed in a cylindrical shape having an approximately circular cross section, but it may also be formed in a pillar shape having a rectangular or an oval cross section.

Magneto-resistive effect element 15 has a film configuration of a typical spin valve. Specifically, magneto-resistive effect element 15 has: free layer 151 whose magnetization direction changes in accordance with an external magnetic field; pinned layer 153 whose magnetization direction is fixed with respect to the external magnetic field: spacer layer 152 that is positioned between free layer 151 and pinned layer 153 and that is in contact both with free layer 151 and with pinned layer 153; and antiferromagnetic layer 154 that is in contact with pinned layer 153 on the back side thereof, as seen from spacer layer 152. Free layer 151, spacer layer 152, pinned layer 153 and antiferromagnetic layer 154 are stacked above a substrate, not shown. Antiferromagnetic layer 154 fixes the magnetization direction of pinned layer 153 by exchange coupling with pinned layer 153. Pinned layer 153 may also have a synthetic configuration having two ferromagnetic layers and a nonmagnetic intermediate layer that is interposed therebetween. Spacer layer 152 is a nonmagnetic and electrically conductive layer that is made of a nonmagnetic metal, such as Cu, or a tunnel barrier layer that is made of a nonmagnetic insulating material, such as Al₂O₃. When spacer layer 152 is a nonmagnetic and electrically conductive layer, magneto-resistive effect element 15 functions as a giant magneto-resistive (GMR) element, and when spacer layer 152 is a tunnel barrier layer, magneto-resistive effect element 15 functions as a TMR element. Because of a large MR change rate and a resultant large output voltage of the bridge circuit, magneto-resistive effect element 15 is more preferably configured by a TMR element.

FIG. 5A shows an xy-plane cross-sectional view of magneto-resistive effect element 15 and a pair of bias magnets 17 that are provided on the lateral sides of magneto-resistive effect element 15. A pair of bias magnets 17, which are made of a hard magnetic material, such as CoPt, is provided near and on both sides of each magneto-resistive effect element 15. Bias magnet 17 has a cross section that is elongated in longitudinal direction L, and in this cross section, bias magnet 17 is magnetized in direction S that is perpendicular to longitudinal direction L. In other words, bias magnet 17 has a shape that is elongated in a direction that is perpendicular to the magnetization direction, and bias magnetic field BB is applied in direction S. The positions of bias magnets 17 in the z-direction are not limited, but bias magnets 17 are desirably provided at least on both lateral sides of free layer 151 in the z-direction. Bias magnets 17 apply bias magnetic field BB to free layer 151 of magneto-resistive effect element 15. Arrow 101 indicates an external magnetic field from external magnet 3. As mentioned above, when external magnets 3 that are fixed to moving lens 4 move in the z-direction, the intensity of the external magnetic field changes around the median value. In other words, the magnitude of the external magnetic field changes between arrow 102 and arrow 103 with arrow 101 as the center.

FIG. 5B shows the relationship between a magnetic field intensity and an output of a magnetic sensor. In general, magneto-resistive element 15 is characterized in that the output is saturated when the magnetic field intensity reaches a certain value. Magnetic sensor 6 is always subjected to an external magnetic field that is generated by external magnets 3. When bias magnets 17 are not provided, substantially only the external magnetic field that is generated by external magnets 3 is applied to magnetic sensor 6. In this case, the output of magnetic sensor 6 changes within a range that corresponds to variation range 104 around median value A of the external magnetic field intensity. However, operating magnetic sensor 6 within variation range 104 of the external magnetic field intensity is disadvantageous for the following reasons.

The external magnetic field is calculated from the output of magnetic sensor 6. In other words, the external magnetic field intensity is reversely calculated from the output of magnetic sensor 6 in the magnetic field intensity-output curve shown in FIG. 5B. Accordingly, when magnetic sensor 6 is used around point A, it is difficult to enhance the accuracy with which the external magnetic field intensity is detected because only a small change of the output can be obtained in response to the change of the magnetic field intensity. Next, the linearity of the output is not good around point A. The external magnetic field intensity is calculated by approximating the magnetic field intensity-output curve shown in FIG. 5B by many linear functions that are connected to each other and by applying the output to the linear functions. When magnetic sensor 6 is used around point A, the magnetic field intensity-output curve needs to be approximated by many linear lines, which require a complex algorithm for calculating the external magnetic field intensity and a large file size in a memory in order to store the data of the many linear lines. Furthermore, when magnetic sensor 6 is used around point A, offset temperature characteristics deteriorate. The offset temperature characteristics indicate how the gradient of the magnetic field intensity-output curve changes depending on temperatures. Specifically, the magnetic field intensity-output curve of magneto-resistive effect element 15 changes depending on temperatures as broken lines Y1 and Y2. Since the absolute value of the detected external magnetic field intensity is large when magnetic sensor 6 is used around point A, the influence of the offset temperature characteristics tends to be increased.

In the present embodiment, bias magnets 17 are provided such that the surface of each bias magnet 17 that is opposite to magneto-resistive effect element 15 (hereinafter, referred to as element facing surface 18) is inclined relative to the y-direction that is perpendicular to the x-direction in which the external magnetic field is applied. Thus, bias magnets 17 apply bias magnetic field BB having component BBx in a direction such that component BBx cancels the external magnetic field that is applied to magneto-resistive effect element 15. Ideally, x-component BBx of bias magnetic field BB is approximately equal to median value A of the external magnetic field and has a sign that is the reverse of median value A of the external magnetic field. Therefore, the combined magnetic field, or the summation of median value A of the external magnetic field and bias magnetic field BB, becomes substantially zero. Since magnetic sensor 6 changes within magnetic field intensity range 105 around the zero magnetic field, the above-mentioned problems hardly occurs. In other words, the external magnetic field is detected more accurately, the algorithm for calculating the external magnetic field intensity is simplified, memory consumption is limited, and the influence of the offset temperature characteristics is reduced. It should be noted that, in the ideal state where the external magnetic field and x-component BBx of bias magnetic field BB are balanced, only y-component BBy of bias magnetic field BB is applied to free layer 151. Since the magnetization of pinned layer 153 is fixed in the x-direction, the magnetization direction of free layer 151 is perpendicular to the magnetization direction of pinned layer 153 in this state.

FIG. 6 is an enlarged view of portion B in FIG. 3A, showing a plan view of magneto-resistive effect elements 15 and bias magnets 17 in the xy-plane. FIG. 7 shows a perspective view of portion B. In the present embodiment, a plurality of sets of a magneto-resistive effect element and a pair of bias magnets are provided. In the following description, one of the magneto-resistive effect elements that are adjacent to each other is referred to as first magneto-resistive effect element 15 a, and the other is referred to as second magneto-resistive effect element 15 b. Moreover, a pair of bias magnets that are provided on both sides of first magneto-resistive effect element 15 a is referred to as first bias magnets 17 a, and a pair of bias magnets that are provided on both sides of second magneto-resistive effect element 15 b is referred to as second bias magnets 17 b. Two first bias magnets 17 a of the pair have the same shapes and are in rotational symmetry with respect to z-directional center line C1 that passes through first magneto-resistive effect element 15 a. Similarly, two second bias magnets 17 b of the pair have the same shapes and are in rotational symmetry with respect to z-directional center line C2 that passes through second magneto-resistive effect element 15 b. First magneto-resistive effect element 15 a and second magneto-resistive effect element 15 b have the same configurations, and first bias magnets 17 a and second bias magnets 17 b also have the same configurations. The positional relationship between first magneto-resistive effect element 15 a and first bias magnets 17 a is the same as the positional relationship between second magneto-resistive effect element 15 b and second bias magnets 17 b.

First bias magnets 17 a have first element facing surfaces 18 a that are opposite to first magneto-resistive effect element 15 a and that extend in longitudinal direction L. Second bias magnets 17 b have second element facing surfaces 18 b that are opposite to second magneto-resistive effect element 15 b and that extend in longitudinal direction L. First element facing surfaces 18 a and second element facing surfaces 18 b are parallel to each other. First bias magnet 17 a has first lateral surface 19 a that is connected to first element facing surface 18 a at acute angle θ, and second bias magnet 17 b has second lateral surface 19 b that is connected to second element facing surface 18 b at acute angle θ. In the xy-cross section shown in FIG. 6, first element facing surface 18 a, second element facing surface 18 b, first lateral surface 19 a and second lateral surface 19 b may also be referred to as first element facing side 18 a′, second element facing side 18 b′, first lateral side 19 a′ and second lateral side 19 b′, respectively. It should be noted that, FIG. 6 may also be regarded as a projection plane which is parallel to the xy-plane and onto which first and second bias magnets 17 a, 17 b and first and second magneto-resistive effect elements 15 a, 15 b are projected.

The areas of cross sections of first and second bias magnets 17 a, 17 b that are parallel to first and second element facing surfaces 18 a, 18 b gradually increase as the cross sections approach first and second magneto-resistive effect elements 15 a, 15 b, respectively. In other words, in the xy-cross section shown in FIG. 6, first element facing side 18 a′ is longer than the other sides of first bias magnet 17 a, and second element facing side 18 b′ is longer than the other sides of second bias magnet 17 b. In the present embodiment, first and second bias magnets 17 a, 17 b in the xy-cross section have trapezoid cross-sections in which first and second element facing sides 18 a′, 18 b′ are long sides of the trapezoids, respectively.

Conventionally, there is known a bias magnet that has a rectangular cross section in which a long side of the rectangle faces an element and that is magnetized in the short side direction. Such a bias magnet has high space efficiency that allows many magneto-resistive effect elements to be arranged in a small space, but the magnetization direction tends to be directed in the longitudinal axis direction due to shape anisotropy that is caused by the elongate shape. When the magnetization direction is directed in the longitudinal axis direction, the x-directional component of bias magnetic field BB is changed, and the external magnetic field cannot be effectively cancelled. As a result, the center of the magnetic field intensity shifts to the positive or the negative side in the magnetic field intensity-output curve, making it difficult to solve the above-mentioned problems. Since the shape anisotropy is mitigated due to the trapezoidal cross-sections of bias magnets 17 a, 17 b in the present embodiment, magnetization direction S is less likely to be directed in longitudinal direction L that is perpendicular to magnetization direction S. As a result, the x-directional component of bias magnetic field BB is more accurately applied in the direction such that the component cancels the external magnetic field, and above-mentioned problems can be easily solved.

Element facing sides 18 a′, 18 b′ are longer than the width of first and second magneto-resistive effect elements 15 a, 15 b in longitudinal direction L, respectively. Thus, bias magnetic field BB is distributed uniformly in longitudinal direction L. FIG. 8A shows a plan view of bias magnet 117 of Comparative Example 1, FIG. 8B shows a plan view of bias magnet 217 of Comparative Example 2, and FIG. 8C shows a plan view of bias magnet 17 of an embodiment. FIG. 8D shows distributions of bias magnetic field BB of bias magnet 17, 117 and 217 in longitudinal direction L. Bias magnet 17 of the embodiment is the same as bias magnet 17 described using FIGS. 6 and 7. Bias magnet 117 of Comparative Example 1 has a rectangular cross section, and the length of the long side is the same as the length of the long side of bias magnet 17 of the embodiment. Bias magnet 217 of Comparative Example 2 has a rectangular cross section, and the length of the long side is the same as the length of the short side of bias magnet 17 of the embodiment. The widths of first and second magneto-resistive effect elements 15 a, 15 b in longitudinal direction L are approximately the same as the length of the long side of bias magnet 217 of Comparative Example 2. As shown in FIG. 8D, Comparative Example 1 shows a strong bias magnetic field that is uniformly distributed in direction L, while Comparative Example 2 shows a bias magnetic field that is distributed, uniformly but in the smallest range, in direction L. The embodiment shows a bias magnetic field distribution approximately the same as that of Comparative Example 1. Accordingly, element facing sides 18 a′, 18 b′ are preferably 1.5 or more times longer than the widths of first and second magneto-resistive effect elements 15 a, 15 b in longitudinal direction L.

Furthermore, as shown in FIGS. 6 and 7 of the present embodiment, first and second bias magnets 17 a, 17 b are combined with first and second magneto-resistive effect elements 15 a, 15 b, respectively; first and second magneto-resistive effect elements 15 a, 15 b are adjacent to each other; and either one of bias magnets 17 a and either one of bias magnets 17 b are adjacent to each other. Moreover, first lateral surface 19 a of first bias magnet 17 a and second lateral surface 19 b of second bias magnet 17 b (first lateral side 19 a′ and second lateral side 19 b′ in the xy-cross section shown in FIG. 6) are opposite to each other. First lateral surface 19 a and second lateral surface 19 b (first lateral side 19 a′ and second lateral side 19 b′) are parallel to each other. Thus, first bias magnet 17 a and second bias magnet 17 b can be more efficiently arranged, and larger numbers of magneto-resistive effect elements 15 can be provided in a limited space. Axis C3 of first bias magnet 17 a and axis C3′ of second bias magnet 17 b may be on the same straight line, or may be displaced from each other. Axis C3 passes through the center of first bias magnet 17 a with regard to the short side direction thereof and extends parallel to longitudinal direction L (the long side), and axis C3′ passes through the center of second bias magnet 17 b with regard to the short side direction thereof and extends parallel to longitudinal direction L (the long side).

FIG. 9A shows an exemplary arrangement of bias magnets 117 a, 117 b of Comparative Example 1, and FIG. 9B shows an exemplary arrangement of bias magnets 217 a, 217 b of Comparative Example 2. In these figures, distance D between adjacent magneto-resistive effect elements 15 a, 15 b in the y-direction is the same as that in the embodiment shown in FIG. 6. In Comparative Example 1 shown in FIG. 9A, first bias magnet 117 a and second bias magnet 117 b physically interfere with each other. This means that distance D between adjacent magneto-resistive effect elements 15 a, 15 b in the y-direction needs to be increased as compared to FIG. 6, in other words, and that the number of magneto-resistive effect elements 15 that can be included in each of element arrays 11 to 14 needs to be decreased. In Comparative Example 2 shown in FIG. 9B, although there is no occurrence of interference between first bias magnet 217 a and second bias magnet 217 b, the range of the bias magnetic field that is uniformly applied is narrow, as described with reference to FIGS. 8A to 8D. In other words, it is possible, in the embodiment, to ensure that large bias magnetic field BB is applied uniformly over a wide range in longitudinal direction L and that bias magnets 17 are efficiently arranged.

FIGS. 10A to 10D show various modifications of the bias magnets. In any of the modifications, all the bias magnets have the same shapes. Referring to FIG. 10A, both first and second bias magnets 21 a, 21 b have parallelogramatic cross sections. Referring to FIG. 10B, both first and second bias magnets 22 a, 22 b have quadrangular cross sections. Side 22 d that is opposite to the other bias magnet 22 a or 22 b is not perpendicular to element facing side 22 c, while side 22 e that is opposite to side 22 d is perpendicular to element facing side 22 c. Side 22 f that is opposite to element facing side 22 c is parallel to element facing side 22 c. Referring to FIG. 100, both first and second bias magnets 23 a, 23 b are isosceles triangles. Element facing side 23 c is the base of the isosceles triangle and is longer than the other two sides 23 d, 23 e. Referring to FIG. 10D, both first and second bias magnets 24 a and 24 b are right triangles. Element facing side 24 c is the base of the right triangle and is shorter than hypotenuse 24 d. The modified bias magnets shown in FIGS. 10B to 10D and the above-mentioned bias magnets having a trapezoidal cross section are in rotational asymmetry with respect to center line (second center line) C4 that is parallel to the z-directional center line (first center lines) of magneto-resistive effect element 15 a, 15 b and that passes through the center of gravity of the bias magnet. Rotational asymmetry is defined to be a shape whose cross section does not coincide with the original cross section when it is rotated at any angle other than 360×N degrees (N is a natural number) around the center line that passes through the center of gravity of the shape.

FIGS. 11A to 13B shows xy-plane plan views of magnetic sensors 6 having bias magnets that are arranged near GMR elements, in which a sense current flows in the y-direction that is perpendicular to the stacking direction (z-direction). AMR elements may be used in place of the GMR elements. The magneto-resistive effect element of the present embodiment has longitudinal axis C5 that extends in the direction that is perpendicular to the external magnetic field applied to the magneto-resistive effect element, and a plurality of bias magnets are arranged on the magneto-resistive effect element along longitudinal axis C5. Magneto-resistive elements are connected in series by means of lead wires, not shown. It should be noted that, FIGS. 11A to 13B can also be regarded as projection planes which are parallel to the xy-plane and onto which the bias magnets and the magneto-resistive effect elements are projected.

In the examples shown in FIGS. 11A and 11B, the magnetic sensor has first bias magnet 37 a that is opposite to the upper surface of magneto-resistive effect element 35, and second bias magnet 37 b that is opposite to the upper surface of magneto-resistive effect element 35 and that is adjacent to first bias magnet 37 a. First bias magnet 37 a applies bias magnetic field BB1 to magneto-resistive effect element 35. Bias magnetic field BB1 has a component in the direction such that the component cancels the external magnetic field that is applied to magneto-resistive effect element 35 and a component that is perpendicular to the external magnetic field. Second bias magnet 37 b applies bias magnetic field BB2 to magneto-resistive effect element 35. Magnetic field BB2 has a component in the direction such that the component cancels the external magnetic field that is applied to magneto-resistive effect element 35 and a component that is perpendicular to the external magnetic field. First bias magnet 37 a has first element facing surface 38 a that is opposite to magneto-resistive effect element 35, first lateral surface 39 a that is connected to first element facing surface 38 a and third lateral surface 39 c that is connected to first element facing surface 38 a and that is connected to first lateral surface 39 a at an acute angle. Second bias magnet 37 b has second element facing surface 38 b that is opposite to magneto-resistive effect element 35, second lateral surface 39 b that is connected to second element facing surface 38 b and fourth lateral surface 39 d that is connected to second element facing surface 38 b and that is connected to second lateral surface 39 b at an acute angle. Bias magnet 37 has a trapezoidal cross-sectional shape, as seen in the z-direction. First lateral surface 39 a and second lateral surface 39 b are opposite to each other. Preferably, third lateral surface 39 c and fourth lateral surface 39 d are parallel to each other. First bias magnet 37 a and second bias magnet 37 b are arranged on a common axis that is parallel to third and fourth lateral surfaces 39 c, 39 d, but they may be arranged on axes that are different from each other.

In the example shown in FIG. 12, the magnetic sensor has first bias magnet 47 a that is opposite to the upper surface of first magneto-resistive effect element 45 a and second bias magnet 47 b that is opposite to the upper surface of second magneto-resistive effect element 45 b and that is adjacent to first bias magnet 47 a. First bias magnet 47 a applies bias magnetic field BB1 to first magneto-resistive effect element 45 a. Bias magnetic field BB1 has a component in the direction such that the component cancels the external magnetic field that is applied to first magneto-resistive effect element 45 a and a component that is perpendicular to the external magnetic field. Second bias magnet 47 b applies bias magnetic field BB2 to second magneto-resistive effect element 45 b. Bias magnetic field BB2 has a component in the direction such that the component cancels the external magnetic field that is applied to second magneto-resistive effect element 45 b and a component that is perpendicular to the external magnetic field. First bias magnet 47 a has first element facing surface 48 a that is opposite to first magneto-resistive effect element 45 a, first lateral surface 49 a that is connected to first element facing surface 48 a and third lateral surface 49 c that is connected to first element facing surface 48 a and that is connected to first lateral surface 49 a at an acute angle. Second bias magnet 47 b has second element facing surface 48 b that is opposite to second magneto-resistive effect element 45 b, second lateral surface 49 b that is connected to second element facing surface 48 b and fourth lateral surface 49 d that is connected to second element facing surface 48 b and that is connected to second lateral surface 49 b at an acute angle. First and second bias magnets 47 a, 47 b have parallelogramatic cross-sectional shapes, as seen in the z-direction. First lateral surface 49 a and second lateral surface 49 b are opposite to each other. Preferably, third lateral surface 49 c and fourth lateral surface 49 d are parallel to each other. First bias magnet 47 a and second bias magnet 47 b are arranged on a common axis that is parallel to third and fourth lateral surfaces 49 c, 49 d, but they may be arranged on axes that are different from each other.

In the examples shown in FIGS. 13A and 13B, the magnetic sensor has first bias magnet 57 a that is opposite to the upper surface of first magneto-resistive effect element 55 a and second bias magnet 57 b that is opposite to the upper surface of second magneto-resistive effect element 55 b and that is adjacent to first bias magnet 57 a. First bias magnet 57 a applies bias magnetic field BB1 to first magneto-resistive effect element 55 a. Bias magnetic field BB1 has a component in the direction such that the component cancels the external magnetic field that is applied to first magneto-resistive effect element 55 a and a component that is perpendicular to the external magnetic field. Second bias magnet 57 b applies bias magnetic field BB2 to second magneto-resistive effect element 55 b. Bias magnetic field BB2 has a component in the direction such that the component cancels the external magnetic field that is applied to second magneto-resistive effect element 55 b and a component that is perpendicular to the external magnetic field. First bias magnet 57 a has first element facing surface 58 a that is opposite to first magneto-resistive effect element 55 a, first lateral surface 59 a that is connected to first element facing surface 58 a and third lateral surface 59 c that is connected to first element facing surface 58 a and that is connected to first lateral surface 59 a at an acute angle. Second bias magnet 57 b has second element facing surface 58 b that is opposite to second magneto-resistive effect element 55 b, second lateral surface 59 b that is connected to second element facing surface 58 b and fourth lateral surface 59 d that is connected to second element facing surface 58 b and that is connected to second lateral surface 59 b at an acute angle. First and second bias magnets 57 a, 57 b have trapezoidal cross-sectional shapes, as seen in the z-direction. First lateral surface 59 a and second lateral surface 59 b are opposite to each other. Preferably, third lateral surface 59 c and fourth lateral surface 59 d are parallel to each other. First bias magnet 57 a and second bias magnet 57 b are arranged on a common axis that is parallel to third and fourth lateral surfaces 59 c, 59 d, but they may be arranged on axes that are different from each other.

In the magnetic sensor shown in FIGS. 11A and 11B, the intensity of bias magnetic fields BB1, BB2 is distributed uniformly in a wide range, and bias magnets 37 a, 37 b are efficiently arranged. In the magnetic sensor shown in FIG. 12, magneto-resistive effect elements 45 a, 45 b can be arranged with a high density because they can be arranged close to each other in the x-direction. In addition, due to the parallelogramatic shapes of bias magnets 47 a, 47 b, short circuit between adjacent magneto-resistive effect elements 45 a, 45 b that is caused by mutual contact can be prevented. In the magnetic sensors shown in FIGS. 13A and 13B, magneto-resistive effect elements 55 a, 55 b can be arranged with a high density because they can be arranged close to each other in the x-direction in the same manner as the magnetic sensor shown in FIG. 12. In addition, due to the parallelogramatic shapes of bias magnets 57 a, 57 b, short circuit between adjacent magneto-resistive effect elements 55 a, 55 b that is caused by mutual contact can be prevented. Furthermore, in the magnetic sensors shown in FIGS. 13A and 13B, efficiency of arrangement can be enhanced by the reduced distance between adjacent magneto-resistive effect elements 55 a, 55 b. Accordingly, the magnetic field can be more accurately detected by increasing the number of magneto-resistive effect elements 55 a, 55 b in order to reduce output variation. It should be noted that, in each embodiment in FIGS. 11A to 13B, the bias magnets are opposite to the upper surface of the magneto-resistive effect element with regard to the stacking direction, but they may be opposite to the lower surface of the magneto-resistive effect element with regard to the stacking direction, or they may be opposite both to the upper surface and to the lower surface of the magneto-resistive effect element. The upper surface is a back surface of the magneto-resistive effect element as seen from the substrate, and the lower surface is a surface thereof on the side facing the substrate.

Although certain preferred embodiments of the present invention have been shown and described in detail, it should be understood that various changes and modifications may be made without departing from the spirit or scope of the appended claims.

LIST OF REFERENCE NUMERALS

-   1 Camera module -   2 Casing -   3 Magnet -   4 Lens -   5 Lens holding member -   6 Magnetic sensor -   7 Coil -   8, 9 Elastic member -   9 a, 9 b Electrically conductive members -   11 to 14 Element array -   15, 35 Magneto-resistive effect element -   16 Lead wire -   17, 37, 47, 117, 217 Bias magnet -   17 a, 21 a, 22 a, 23 a, 24 a First bias magnet -   17 b, 21 b, 22 b, 23 b, 24 b Second bias magnet -   18 Element facing surface -   18 a First element facing surface -   18 a′ First element facing side -   18 b Second element facing surface -   18 b′ Second element facing side -   19 a First lateral surface -   19 a′ First lateral side -   19 b Second lateral surface -   19 b′ Second lateral side -   151 Free layer -   152 Spacer layer -   153 Pinned layer -   154 Antiferromagnetic layer -   BB Bias magnetic field -   C1, C2 Center line -   C3 Common axis -   C4 Center line -   C5 Longitudinal axis -   D Distance in the y-direction between adjacent magneto-resistive     effect elements 

What is claimed is:
 1. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; and a pair of bias magnets that is provided near the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein each bias magnet has an elongated cross section in a plane that is parallel both to the external magnetic field and to the bias magnetic field, in a projection plane that is parallel to the elongated cross section and onto which the bias magnets and the magneto-resistive effect element are projected, each bias magnet includes an element facing side that is opposite to the magneto-resistive effect element and that extends in a longitudinal direction, each bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction, and the element facing side is longer than other sides, each bias magnet has a pair of lateral sides that are both connected to the element facing side at an acute angle, and each bias magnet has a cross section in a form of an acute trapezoid in which the element facing side is a longer base of the acute trapezoid.
 2. The magnetic sensor according to claim 1, further comprising a first set and a second set, each set consisting of the magneto-resistive effect element and the pair of bias magnets, wherein either one of the bias magnets of the first set and either one of the bias magnets of the second set are adjacent to each other, and the lateral side of said either one of the bias magnets of the first set and the lateral side of said either one of the bias magnets of the second set are opposite to each other.
 3. The magnetic sensor according to claim 1, wherein the element facing side is 1.5 or more times longer than a width of the magneto-resistive effect element in the longitudinal direction.
 4. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; and a pair of bias magnets that is provided near the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein an area of a cross section of each bias magnet gradually increases as the cross section approaches the magneto-resistive effect element, wherein the cross section is parallel to a surface of each bias magnet that is opposite to the magneto-resistive effect element.
 5. The magnetic sensor according to claim 4, wherein the pair of bias magnets is in rotational symmetry with respect to a first center line that passes through the magneto-resistive effect element, and each bias magnet is in rotational asymmetry with respect to a second center line that is parallel to the first center line and that passes through a center of gravity of each bias magnet.
 6. The magnetic sensor according to claim 1, wherein the magneto-resistive effect element is a TMR element.
 7. The magnetic sensor according to claim 1, wherein the magneto-resistive effect element has a longitudinal axis in a direction that is perpendicular to the external magnetic field that is applied to the magneto-resistive effect element, and a plurality of the pairs of bias magnets are arranged along the longitudinal axis such that the bias magnets are opposite to an upper surface and/or a lower surface of the magneto-resistive effect element.
 8. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: first and second magneto-resistive effect elements, each generating a magnetic resistance change in accordance with the change of the external magnetic field; a first bias magnet that is provided near the first magneto-resistive effect element and that applies a bias magnetic field to the first magneto-resistive effect element, wherein the bias magnetic field that is applied by the first bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the first magneto-resistive effect element and a component that is perpendicular to the external magnetic field; and a second bias magnet that is provided near the second magneto-resistive effect element and that applies a bias magnetic field to the second magneto-resistive effect element, wherein the bias magnetic field that is applied by the second bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the second magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein the first bias magnet includes a first element facing surface that is opposite to the first magneto-resistive effect element and a pair of first lateral sides that are both connected to the first element facing surface at an acute angle, the second bias magnet includes a second element facing surface that is opposite to the second magneto-resistive effect element and a pair of second lateral sides that are both connected to the second element facing surface at an acute angle, and one of the first lateral surfaces and one of the second lateral surfaces are opposite to each other.
 9. The magnetic sensor according to claim 8, wherein the first element facing surface and the second element facing surface are parallel to each other.
 10. The magnetic sensor according to claim 9, wherein the first bias magnet and the second bias magnet are arranged on a common axis that is parallel to the first and second element facing surfaces.
 11. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; a first bias magnet that is opposite to an upper surface and/or a lower surface of the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field that is applied by the first bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field; and a second bias magnet that is opposite to the upper surface and/or the lower surface of the magneto-resistive effect element, that is adjacent to the first bias magnet and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field that is applied by the second bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein the first bias magnet has: a first element facing surface that is opposite to the magneto-resistive effect element; a pair of first lateral surfaces that are both connected to the first element facing surface; and a third lateral surface that is connected to the first element facing surface and that is connected to the first lateral surfaces at an acute angle, the second bias magnet has: a second element facing surface that is opposite to the magneto-resistive effect element; a pair of second lateral surfaces that are both connected to the second element facing surface; and a fourth lateral surface that is connected to the second element facing surface and that is connected to the second lateral surfaces at an acute angle, and one of the first lateral surfaces and one of the second lateral surfaces are opposite to each other.
 12. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: first and second magneto-resistive effect elements, each generating a magnetic resistance change in accordance with the change of the external magnetic field; a first bias magnet that is opposite to an upper surface and/or a lower surface of the first magneto-resistive effect element and that applies a bias magnetic field to the first magneto-resistive effect element, the bias magnetic field that is applied by the first bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the first magneto-resistive effect element and a component that is perpendicular to the external magnetic field; and a second bias magnet that is opposite to the upper surface and/or the lower surface of the second magneto-resistive effect element, that is adjacent to the first bias magnet and that applies a bias magnetic field to the second magneto-resistive effect element, the bias magnetic field that is applied by the second bias magnet has a component in a direction such that the component cancels the external magnetic field that is applied to the second magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein the first bias magnet has: a first element facing surface that is opposite to the first magneto-resistive effect element; a first lateral surface that is connected to the first element facing surface; and a third lateral surface that is connected to the first element facing surface and that is connected to the first lateral surface at an acute angle, wherein the third lateral surface is longer than the first lateral surface, the second bias magnet has: a second element facing surface that is opposite to the second magneto-resistive effect element; a second lateral surface that is connected to the second element facing surface; and a fourth lateral surface that is connected to the second element facing surface and that is connected to the second lateral surface at an acute angle, wherein the fourth lateral surface is longer than the second lateral surface, and the first lateral surface and the second lateral surface are opposite to each other.
 13. The magnetic sensor according to claim 11, wherein the third lateral surface and the fourth lateral surface are parallel to each other.
 14. The magnetic sensor according to claim 13, wherein the first bias magnet and the second bias magnet are arranged on a common axis that is parallel to the third and fourth lateral surfaces.
 15. A camera module comprising: a magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; and a pair of bias magnets that is provided near the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field; the external magnet; a first member that includes a lens; and a second member that supports the first member such that the first member is relatively movable in an optical axis direction of the lens, wherein each bias magnet has an elongated cross section in a plane that is parallel both to the external magnetic field and to the bias magnetic field, in a projection plane that is parallel to the elongated cross section and onto which the bias magnets and the magneto-resistive effect element are projected, each bias magnet includes an element facing side that is opposite to the magneto-resistive effect element and that extends in a longitudinal direction, each bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction, and the element facing side is longer than other sides, each bias magnet has a pair of lateral sides that are both connected to the element facing side at an acute angle, each bias magnet has a cross section in a form of an acute trapezoid in which the element facing side is a longer base of the acute trapezoid, and the magnetic sensor is supported by the first member or the second member, and the external magnet is supported by the other first member or the other second member.
 16. A magnetic sensor that moves relative to an external magnet and that detects a change of an external magnetic field that is generated by the external magnet, the magnetic sensor comprising: a magneto-resistive effect element that generates a magnetic resistance change in accordance with the change of the external magnetic field; and a pair of bias magnets that is provided near the magneto-resistive effect element and that applies a bias magnetic field to the magneto-resistive effect element, the bias magnetic field having a component in a direction such that the component cancels the external magnetic field that is applied to the magneto-resistive effect element and a component that is perpendicular to the external magnetic field, wherein each bias magnet has an elongated cross section in a plane that is parallel both to the external magnetic field and to the bias magnetic field, and in a projection plane that is parallel to the elongated cross section and onto which the bias magnets and the magneto-resistive effect element are projected, each bias magnet includes an element facing side that is opposite to the magneto-resistive effect element and that extends in a longitudinal direction, each bias magnet is magnetized in a direction that is perpendicular to the longitudinal direction, and the element facing side is longer than other sides, wherein each bias magnet has lateral sides that are both connected to the element facing side at an acute angle, and the bias magnet has a cross section in which the element facing side is a long side thereof.
 17. The magnetic sensor according to claim 2, wherein a positional relationship between the magneto-resistive effect element and the pair of the bias magnets of the first set is the same as a positional relationship between the magneto-resistive effect element and the pair of the bias magnets of the second set. 